package com.example.schedule.utils;

import android.util.Log;
import android.view.View;
import android.widget.Toast;

public abstract class DoubleClick implements View.OnClickListener {
    private static final long LONGTIME = 1000;
    private static long cur = 0;

    @Override
    public void onClick(View v) {
        long curr = System.currentTimeMillis();
        if (curr - cur < LONGTIME){
            doubleC(v);
        }
        cur = curr;
    }

    public abstract void doubleC(View view);
}
